import {sendActionGet} from '../../utils/axios';

const AlbumList ={
    state:{
        objects1:[{
            id:"",
            name:"",
            size:""
        }]
    },
    reducers:{
        getAlbumList(state,payload){
            return{
                objects1:payload
            }
        }
    },
    effects:{
        async getAlbumListAsync(payload,rootState){
            const res = await sendActionGet(`/api/v1/album/${payload}/objects`);
            this.getAlbumList(res.data.objects)
            return res;
        }
    }
}

export default AlbumList;